import { Digdit, Int, PrimaryUuid, Title, Code, Entity, CreateDate, UpdateDate } from "../utils";
import { Index } from "typeorm";

@Entity({
    name: 'fj_room_attribute'
})
@Index('FJ_ROOM_ATTRIBUTE_FROM_ROOM_TYPEID', ['from', 'room_type_id'])
export class FjRoomAttribute {
    @PrimaryUuid()
    id: string;

    @Int()
    hotelid: number;

    @Int()
    room_type_id: number;

    @Title()
    name: string;

    @Title()
    name_cn: string;

    @Code()
    has_wifi: string;

    @Code()
    has_window: string;

    @Digdit()
    max_occupancy: number;

    @Code()
    size: string;

    @Code()
    floor: string;

    @Code()
    from: string;

    @Code({ nullable: true })
    hash: string;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}